<div style='float:right; '>	
    <a href="<?=CONTROLLER_URL?>new_user" class='right ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all' style='padding:10px;' />Novi korisnik</a>
</div>

<div style='float:right; '>	
    <a href="<?=CONTROLLER_URL?>find_users" class='right ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all' style='padding:10px;' />Pronadji korisnika</a>
</div>

<h1>Dobrodošli na stranicu <?=$title?></h1>

<?php if($users){ ?>

<table align=center cellspacing=5 cellpadding=3 width=100%>
<tr><th>Ime</th><th>Prezime</th><th>E-mail</th><th>Poslednji pristup</th><th>IP</th><th>Izmeni</th><th>Obriši</th><th>Nova lozinka</th></tr>

<?php
	
	echo "Strana: {$page} <br>";
	//$content_url = base_url();
	foreach ($users as $user) 
	{
		echo "<tr>";		
		echo "<td class='korisnici'>{$user['firstname']}</td>";
		echo "<td class='korisnici'>{$user['lastname']}</td>";
		echo "<td class='korisnici'>{$user['e_mail']}</td>";
		echo "<td class='korisnici'>{$user['timestamp']}</td>";
		echo "<td class='korisnici'>{$user['ip_address']}</td>";
		echo "<td class='korisnici' align=center><a href='{$content_url}users/edit_user/{$user['id']}'><img src='".base_url()."img/edit.png' border=0 alt='Izmeni' /></a></td>";
		echo "<td class='korisnici' align=center><a href='{$content_url}users/delete_user/{$user['id']}'><img src='".base_url()."img/delete.png' border=0 alt='Obriši' /></a></td>";
		echo "<td class='korisnici' align=center><a href='{$content_url}users/new_password_user/{$user['id']}'><img  src='".base_url()."img/nova_lozinka.png' border=0 alt='Nova lozinka' /></a></td>";
		
		echo "</tr>";
	}
	
	// paginacija
	
	echo "<tr><td colspan=8 align=center> ". $pagination ." </td></tr>"

?>

</table>

<?php 
}
else
	echo "Nema pronadjenih podataka.<br/>";
?>